﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectInstrument.aspx.cs" Inherits="Runda.CMS.Portal.Lookup.SelectInstrument" Title="Untitled Page" %>
 
 <html>
<head>
    <title>查找记录</title>
    <base target="_self"></base>
    <link rel="stylesheet" type="text/css" href="../Content/Form/form.css" />
    <link rel="stylesheet" type="text/css" href="../Content/Dialog/Dialogs.css" />
    <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../Content/Form/addrelated.js"></script>

    <script type="text/javascript" src="../Content/util.js"></script>

    <link rel="stylesheet" type="text/css" href="../Content/Form/select.css" />
    <link rel="stylesheet" type="text/css" href="../Content/global.css" />   
    <script type="text/javascript" src="../Content/global.js"></script>

    <link rel="stylesheet" type="text/css" href="../Content/Menu/Menu.css" />
    <link rel="stylesheet" type="text/css" href="../Content/lookup/lookupdialogs.css" />

    <script type="text/javascript" src="../Content/lookup/map_LookupDialogs.js"></script>
   <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" /> 
    <script src="../Content/Grid/map_grid.js" type="text/javascript" ></script>
    
    <script type="text/javascript">
        function CancelSelect() {
            window.close();
        }

        function Select() { 
            var arr = new Array();
            var arrTr = grid.getSelected();
            if (arrTr.length > 0) {
                arr[0] = arrTr[0].oid;
                arr[1] = arrTr[0].oname;
                arr[2] = arrTr[0].otype;
            }
            else {
                alert('请选择机械');
            }          
            window.returnValue = arr;
            window.close();
        }
    </script>
    
</head>
<body>
<form id="form1" runat="server">
    <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" class="header">
                <div class="header">
                    查找记录</div>
                <div class="headerdesc">在查找输入框输入你要查找的信息并点&#8220;查找&#8221;，然后，选择你所要的记录并点确定。</div>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="height: 100%;">
                <div class="main">
                    <div id="divWarning">
                        <table cellspacing="0" cellpadding="0" width="100%" height="100%">
                            <tr>
                                <td class="search">
                                    <table width="100%" cellpadding="2" cellspacing="0">
                                        <col>
                                        <col width="100%">
                                        <col>
                                        <tr>
                                            <td height="25" nowrap>
                                                <b style="color: #666666;">类型:</b>
                                            </td>
                                            <td colspan="2">
                                                选择器械
                                            </td>
                                        </tr>
                                        <tr>
                                            <td nowrap>
                                                <b style="color: #666666;">查找:</b>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtName" runat="server" style="width: 100%; font-size: 9pt; border: 1px solid #7b9ebd;"></asp:TextBox> 
                                            </td>
                                            <td>
                                                <asp:Button ID="btnSearch" runat="server" Text="查找" CssClass="button" 
                                                    onclick="btnSearch_Click"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" id="ErrorMessage" style="padding-top: 10px; display: none;">
                                                <table width="100%" cellspacing="0" cellpadding="2" style="background-color: #ffffcc;
                                                    border: 1px solid #919276; table-layout: fixed; padding-top: 20px">
                                                    <col width="25">
                                                    <col>
                                                    <tr>
                                                        <td style="text-align: center; vertical-align: middle;">
                                                            <img src="/Images/16_info.gif">
                                                        </td>
                                                        <td style="padding: 5px;">
                                                            超过 100 条可用记录。如果你没有发现你要找的记录，试试另一个条目。
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" style="height: 10px; font-size: 1px; border-bottom: 2px inset #ffffff;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table width="100%" id="tblFind" cellpadding="0" cellspacing="0">
                                        <col width="30">
                                        <tr height="20">
                                            <td>
                                                可用记录:
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" style="padding-top: 5px">
             <asp:Repeater ID="RepeaterContract" runat="server" >
                 <HeaderTemplate>
                    <table id="grid" class="grid" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="header">
                    <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">器械名称</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                      <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">器械代码</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                </tr>
                 </HeaderTemplate>
                 <ItemTemplate>
                  <tr class="data" onclick="handleClick()" oid='<%#Eval("InstrumentGUID") %>' otype='<%# Eval("Type") %>' oname='<%# Eval("InstrumentName") %>'>
                    <td><%#Eval("InstrumentName")%></td> 
                    <td><%#Eval("InstrumentCode")%></td>
                </tr>
                 </ItemTemplate>
                 <FooterTemplate>
                    </tbody>
                </table>  
                 </FooterTemplate> 
             </asp:Repeater>    
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id='divFillBg' style='display: none; position: absolute; top: 80px; left: 20px;
                    height: 23px; width: 355px; background-color: #ffffff;'>
                    &nbsp;
                </div>
                <div id='divFill' style='display: none; position: absolute; top: 80px; left: 20px;
                    height: 23px; width: 0px; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#00ff00, EndColorStr=#00cc00);'>
                    &nbsp;
                </div>
                <div id='divStatus' style='display: none; position: absolute; top: 80px; left: 19px;
                    height: 23px; width: 357px;'>
                    <img src='/Images/statusbar.gif' height='23' width='357' />
                </div>
            </td>
        </tr>
        <tr>
            <td class="footer">
                &nbsp;
            </td>
            <td align="right" class="footer">
                <button id="butBegin" onclick="Select();">
                    确定</button>&nbsp;
                <button id="cmdDialogCancel" onclick="CancelSelect();">
                        取消</button>
            </td>
        </tr>
    </table>
</form>
</body>
</html>